package com.xingkeduo.config;

import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author chi  2019-07-30 11:19
 **/
@Component
public class DomainConfig {

    @Resource
    private Environment environment;


    /**
     * 返回是否是正式环境
     * @return
     */
    public boolean isRelease() {
        String property = environment.getProperty("doamin.gateway.url", String.class, "http://gateway.xingkeduo.com");
        return property.contains("gateway.xingkeduo.com");
    }
}
